package com.czk.model.state.practice;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/8/9 14:34
 */
public class OrderContext {
    /**
     * 当前状态
     */
    private OrderState currentState;
    /**
     * 订单编号
     */
    private String orderNo;

    public OrderContext(OrderState currentState, String orderNo) {
        this.currentState = currentState;
        this.orderNo = orderNo;
    }

    public OrderState getCurrentState() {
        return currentState;
    }

    public void setCurrentState(OrderState currentState) {
        this.currentState = currentState;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public void updateState() {
        this.currentState.updateState(this);
    }
}
